package SV_DOS_TMPFILEEXIT;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;

public class Example {
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String name = req.getParameter("userName");
        File file = File.createTempFile("file", ".dat");
        fillWithUserData(name);
        char[] data = readData(file);
        resp.getWriter().print(data);
    }

    private void fillWithUserData(String name) {
    }

    private char[] readData(File file) {
        return null;
    }
}
